<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>用户机构分配页面</title>
<link href="#(basePath)static/admin/css/zTreeStyle/zTreeStyle.css" rel="stylesheet"/>
<link href="#(basePath)static/admin/css/metroStyle/metroStyle.css" rel="stylesheet"/>
<script type="text/javascript" src="#(basePath)static/libs/jquery.min.js"></script>
<script type="text/javascript" src="#(basePath)static/admin/js/zTree/jquery.ztree.all-3.5.js"></script>
</head>
<body>
<div style="display: block" id="ztree" >
	 <ul id="ztreeDemo" class="ztree"></ul>
</div>
<script type="text/javascript">
var zTreeObj;
var setting = {
     view: {
        selectedMulti  : true,
        dblClickExpand : false,
        showLine  : false
     },
     check: {
        enable: true,
        chkboxType: { "Y": "", "N": "" },
     },
     data: {
        simpleData: {
     	    enable: false
     	}
     },
     edit: {
         enable: false
     },
 };

var zNodes = #(ztree);
$(document).ready(function(){
   	zTreeObj =$.fn.zTree.init($("#ztreeDemo"), setting, zNodes);
})

function getTreeChecked(){
	var nodes = zTreeObj.getCheckedNodes(true);
	return nodes;
}
</script>
</body>
</html>